import tableTitle from "@/components/commons/TableTitle";
import agGrid from "@/components/commons/AgGrid/index";

// test

const AgGridBaseMixin = {
  data() {
    return {
      loading: false,
      pageSize: 20,
      page: 1,
      total: 0,
      rowData: [],
      gridObj: {},
      height: 300,
      extraColumns: [],
      showTableSetting: false,
      rules: [],
    };
    /*
        {
          prop: "action",
          rowDrag: true,
          fixed: "right",
          width: 40,
        },
    */
  },
  methods: {
    handleSelectionChange(data) {
      console.log(data);
    },
    // 分页操作
    handleSizeChange(val) {
      console.log("分页操作【page = %o， val = %o】", this.page, val);
      this.getTableData(this.page, val);
    },
    handleCurrentChange(val) {
      this.getTableData(val, this.pageSize);
    },
    filterChanged(event) {
      console.log(event);
    },
    cellDblclick(data, elTableData, target, e) {
      // console.log(data);
      // console.log(elTableData);
      // console.log(target);
      // console.log(e);
    },
    agGridReady(params){
      this.gridObj = params;
    }
  },
  mounted() {

  },
  components: {
    "v-tableTitle": tableTitle,
    agGrid,
  },
};
export default AgGridBaseMixin;
